package com.zx.onlineeducation.common.util;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 返回结果的状态码 枚举类
 *
 * @author 郑雪
 * @since 2022-01-07
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum ResultCodeEnum {

    SUCCESS(true,20000,"成功"),
    FAILED(false,20001,"失败"),
    PARAM_ERROR(false,20002,"参数错误"),
    NULL_POINT(false,20003,"空指针异常"),
    HTTP_CLIENT_ERROR(false,20004,"客户端连接异常"),
    EXCEL_NULL_ERROR(false, 20005, "Excel表格没有数据"),
    MOBILE_NULL_ERROR(false, 20006, "手机号不能为空"),
    PASSWORD_NULL_ERROR(false, 20007, "密码不能为空"),
    MOBILE_NOT_EXIST(false, 20008, "手机号不存在"),
    PASSWORD_ERROR(false, 20009, "密码错误"),
    ACCT_DISABLED(false, 20010, "账号已禁用"),
    CODE_NULL_ERROR(false, 20011, "验证码不能为空"),
    CODE_ERROR(false, 20012, "验证码错误"),
    MOBILE_ALREADY_EXIST(false, 20013, "手机号已存在");

    /**
     * 响应是否成功
     */
    private Boolean success;

    /**
     * 响应状态码
     */
    private Integer code;
    
    /**
     * 响应信息
     */
    private String message;

}
